<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');?>
<div class="pad-lr-10">
<form name="myform" id="myform" action="" method="post" >
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
            <th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
			<th width="40">ID</th>
            <th width="100">来源标题</th>
            <th width="100">管理员</th>
            <th width="130">添加时间</th>
            <th width="100">添加人</th>
			<th width="200"><?php echo L('operations_manage');?></th>
            </tr>
        </thead>
    <tbody>
	<?php
	if(!empty($datas)) {
	foreach($datas as $r) {
	?>
    <tr>
    	<td align="center"><input class="inputcheckbox " name="id[]" value="<?php echo $r['id'];?>" type="checkbox"></td>
		<td align='center'><?php echo $r['id']?></td>
		<td align='center'><?=$sourceList[$r['source_id']]?></td>
		<td align='center'><?=$adminInfo[$r['userid']]?></td>
		<td align='center'><?=$r['create_time']?></td>
		<td align='center'><?=$adminInfo[$r['created_by']]?></td>
		<td align='center'>
		<a href="?m=reg_child&c=manage&a=permission_del&id=<?php echo $r['id']?>&pc_hash=<?=$_SESSION['pc_hash']?>" onClick="return confirm('<?php echo L('confirm', array('message' => new_addslashes($r['title'])))?>')"><?php echo L('delete')?></a>
		</td>
	</tr>
	<?php } 

	} else {
		echo "<tr><td colspan='8' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
		}?>
    </tbody>
    </table>
    <div class="btn"><label for="check_box"><?php echo L('selected_all');?>/<?php echo L('cancel');?></label>
		<input type="hidden" value="<?php echo $pc_hash;?>" name="pc_hash">
		<input type="button" class="button" value="<?php echo L('delete');?>" onclick="myform.action='?m=reg_child&c=manage&a=permission_del&dosubmit=1&steps=<?php echo $steps;?>';return confirm_delete()"/>
	</div>
   <div id="pages"><?php echo $pages;?>
  </div>

</div></form>
<script type="text/javascript"> 
<!--
window.top.$('#display_center_id').css('display','none');
function edit(id, name) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'修改《'+name+'》',id:'edit',iframe:'?m=sign_up&c=reg&a=edit&pc_hash=<?=$_SESSION["pc_hash"]?>&id='+id,width:'580',height:'420'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function confirm_delete(){
	if(confirm('删除选中配置')) $('#myform').submit();
}
//-->
</script>
</body>
</html>
